package cn.iocoder.yudao.framework.pay.core.client.impl.pax.model;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Positive;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class PaxInvokeRefundOrderRequest extends PaxRequest {

    @NotEmpty(message = "paxPrepayId cannot be empty")
    @Length(max = 64, message = "paxPrepayId length must be less than or equal to 64")
    private String paxPrepayId;

    @NotEmpty(message = "merchantRefundId cannot be empty")
    @Length(max = 64, message = "merchantRefundId length must be less than or equal to 64")
    private String merchantRefundId;

    @NotEmpty(message = "refundAmount cannot be empty")
    @Positive(message = "refundAmount is not a legal amount")
    private String refundAmount;

    @Length(max = 255, message = "refundReason length must be less than or equal to 255")
    private String refundReason;

    private String notifyUrl;

    @Override
    public String apiPath() {
        return "/openapi/v1/order/refund";
    }
}
